<?
include('../../initDB.php');
include('../../functions.php');

session_start();

$response = "";

echo "session: " . $_SESSION['log'] . "\n\r\t";
echo "session: " . $_SESSION['user'] . "\n\r\t";

if ($_SESSION['log'] == TRUE) {
	echo "HEY";
	$linkID = $_REQUEST['linkID'];
	$linkID = magic_quotes($linkID);
	$linkID = escape_string($linkID);
	$db_click_link->execute(array($linkID));
	#$response = array("success");
	echo "2HEY";
}
else {
	$response = array("error");
}
	
	

print_output($response);

?>